using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace mmq
{
    public partial class News : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string UserCulture = HttpContext.Current.Profile.GetPropertyValue("PreferredCulture").ToString();
            IDataReader reader = BLL.PageContentManager.GetRandomPageContent("News", UserCulture);
            if (reader.Read())
            {
                MetaKeyword = reader["Title"].ToString();
                Description = reader["Description"].ToString();

            }
        }

        protected void hyLink_Edit_Click(object sender, EventArgs e)
        {
            dv_News.AutoGenerateEditButton = true;
            dv_News.ChangeMode(DetailsViewMode.Edit);
        }

        protected void dv_News_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
        {
            dv_News.AutoGenerateEditButton = false;
        }
    }
}
